package wangchao.validate.filter;

import com.alibaba.fastjson.JSONObject;
import wangchao.validate.ValidateType;

/**
 * 具体验证接口
 * Created by ashin on 2018/11/2.
 */
public interface SpecificValidationAdapter {

    /**
     * 返回自定义说明
     *
     * @param customInstructions
     * @return
     */
    String returnCustomInstructions(ValidateType validateType, String customInstructions, int specify,String regex);

    /**
     * 返回自定义说明
     *
     * @param customInstructions
     * @return
     */
    JSONObject returnCustomInstructionsFull(ValidateType validateType, String customInstructions, int specify, String oKey);

    /**
     * 返回自定义说明（匹配正則）
     *
     * @param customInstructions
     * @return
     */
    JSONObject returnCustomInstructionsFull(ValidateType validateType, String customInstructions, int specify, String oKey, String regex);

    /**
     * 判断数字的大小，字符串长度
     *
     * @return
     */
    boolean checkNumLength(ValidateType validateType, int specify, double checkNum);

    /**
     * 正则检查
     *
     * @return
     */
    boolean checkRegex(String regEx, String value);
}
